package com.tyqx.hashchainbiz.service.impl;

import com.tyqx.hashchainbean.module.JZTCodeCirculationRelationship;
import com.tyqx.hashchainbean.module.JZTLogisticsRelationship;
import com.tyqx.hashchainbiz.service.JZTCodeCirculationRelationshipService;
import com.tyqx.hashchaindao.mapper.JZTCodeCirculationRelationshipMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("jztCodeCirculationRelationshipService")
public class JZTCodeCirculationRelationshipServiceImpl implements JZTCodeCirculationRelationshipService {

    @Resource
    private JZTCodeCirculationRelationshipMapper jztCodeCirculationRelationshipMapper;

    @Override
    public Integer addJZTCodeCirculationRelationship(JZTCodeCirculationRelationship jztCodeCirculationRelationship) {
        return jztCodeCirculationRelationshipMapper.addJZTCodeCirculationRelationship(jztCodeCirculationRelationship);
    }

    @Override
    public List<String> getParentTraceabilityCodeByTraceabilityCode(String traceabilityCode) {
        return jztCodeCirculationRelationshipMapper.getParentTraceabilityCodeByTraceabilityCode(traceabilityCode);
    }

    @Override
    public Integer insertBatch(List<JZTCodeCirculationRelationship> jztCodeCirculationRelationshipList) {
        return jztCodeCirculationRelationshipMapper.insertBatch(jztCodeCirculationRelationshipList);
    }
}
